<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var id;
			function run1(){
				alert("run1");
				
				//关闭定时器
				clearInterval(id);
			}

			//两秒执行
			id = setInterval("run1()", 2000);

		</script>
	</head>
	<body>
	</body>
</html>
